package classes.Text;

import db.Jdbc;

import static db.Jdbc.stat;

/**
 * @Auther: 程嘉明
 * @Date: 2018/8/21/021 16:01
 * @Description:测试是否能够使用jdbc类
 */
public class JdbcText {
    /**
     * 插入函数
     *
     * @throws Exception
     */
    public void insert(String ID, String GDBS, String GDMC, String GDDZ, String HTBH, String SGXKZBH) throws Exception {
        Jdbc.getConnection();
        String sql = "insert into t_gdsbxx values('" + ID + "','" + GDBS + "','" + GDMC + "','" + GDDZ + "','" + HTBH + "','" + SGXKZBH + "') ";
        Jdbc.stat.executeUpdate(sql);
        stat.close();
        Jdbc.conn.close();
    }

    public static void main(String[] args) throws Exception {
        JdbcText jdbctext =new JdbcText();
        jdbctext.insert("T000002","CCT64","常春藤64栋","山东济南","HT0002","LT00002");
        //插入成功
    }
}
